import 'package:flutter/material.dart';
import './components/item.dart';

class chapterOne1 extends StatefulWidget {
  const chapterOne1({Key? key}) : super(key: key);

  @override
  _chapterOne1State createState() => _chapterOne1State();
}

class _chapterOne1State extends State<chapterOne1> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: Text(
            'md-1',
            style: TextStyle(color: Colors.white),
          ),
          backgroundColor: Theme.of(context).indicatorColor,
        ),
        body: Card(
          child: TextButton(
            child: Padding(
              padding: EdgeInsets.only(left: 0, top: 10, bottom: 10, right: 0),
              child: Column(
                mainAxisSize: MainAxisSize.min,
                children: [
                  Container(
                    child: Text(
                      '描述',
                      style: TextStyle(color: Colors.grey, fontSize: 14),
                      maxLines: 3,
                      overflow: TextOverflow.ellipsis,
                    ),
                    margin: EdgeInsets.only(top: 6, bottom: 10),
                    alignment: Alignment.topLeft,
                  ),
                  Padding(padding: EdgeInsets.all(10)),
                  Row(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: <Widget>[
                      demoItem(Icons.star, '1000'),
                      demoItem(Icons.link, '1000'),
                      demoItem(Icons.subject, '1000'),
                    ],
                  )
                ],
              ),
            ),
            onPressed: () {
              print('点击了');
            },
          ),
        ));
  }
}


